﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PackerService
{
    public class BackUpInfo : IComparable
    {
        public List<string> Files
        {
            get;
            set;
        }

        public string Folder
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public DateTime Created
        {
            get;
            set;
        }

        public bool Compressed
        {
            get;
            set;
        }

        public BackUpInfo(List<string> files, string folder, string name, DateTime created,bool comp)
        {
            this.Files = files;
            this.Folder = folder;
            this.Name = name;
            this.Created = created;
            this.Compressed = comp;
        }

        int IComparable.CompareTo(object obj)
        {
            if (obj == null) return 1;

            BackUpInfo back = obj as BackUpInfo;
            return Created.CompareTo(back.Created);
        }
    }
}
